<?php $this->import('Header') ?>
<div style="height: 30px;"></div>
<div class="well">
	<div class="tab-content">
		<div class="tab-pane active in">
			<div id="message-box"></div>
			<form method="post">
				<input name="id" type="hidden" value="<?php echo !empty($data['ArticleId']) ? $data['ArticleId'] : ''; ?>" />
				<label>标题</label>
				<input type="text" name="title" value="<?php echo $data['Title'] ?>" class="input-xlarge">
				<label>分类</label>
				<select defaultId="<?php echo $data['CategoryId'] ?>" id="js-category" name="categoryId"></select>
				<label>来源</label>
				<input type="text" name="source" value="<?php echo htmlspecialchars($data['Source']) ?>" class="input-xlarge">
				<label>内容</label>
				<script name="content" id="js-content" class="input-xxlarge" style="width:100%;" type="text/plain"><?php echo $data['Content'] ?></script>
				<div class="btn-toolbar">
					<button class="btn btn-primary"><i class="icon-save"></i> 保存</button>
				</div>
			</form>
		</div>
	</div>
</div>
<?php $this->import('Footer') ?>
<?php
	$this->addJs(array('umeditor/umeditor.config.js','umeditor/umeditor.min.js',));
	$this->addCss('umeditor/themes/default/css/umeditor.css');
?>
<script>
$('#js-category').category({
	pid:<?php echo !empty($category['Pid']) ? $category['Pid'] : 0 ?>,
	data: <?php echo json_encode($all) ?>,
	selectAll: true
});
var ue = UM.getEditor('js-content');
</script>